Synchronization mechanism for non-POSIX#15
Conversation
Use helper thread to read stderr and block on read instead of non-crossplatform compatible select()
|
I still need to implement the stop & cleanup on destruction, otherwise the threads will persist over the lifetime of the object. |
|
Hi. Thanks for working on this. Before we talk about specifics of the patches, some questions:
|
|
To 1. for the near future this would be fine. To 2. It's not ready to merge yet, I wanted to see if a solution like this is an option at all for you. I will definitely work on it on my own branch until it's ready. |
|
I'm investigating a weird issue where GNUplot hangs after subsequent plotting into it. And then of course |
|
OK. I'm definitely interested in getting this working on more platforms, so once you get it running, ping me, and we can get this merged. |
Today I tried to run an application with gnuplotlib on a Windows machine and had to add following patches to make it start.
I still see problems with the polling as under high load the threads probably fire too late but this is a first idea how to solve synchronization for all platforms with one solution.
If this not desirable (
select.selectis much more elegant) I'd think of modifying the synchronization so this solution is used for Windows (and other platforms which don't support select() and file objects.